package ae.pcfc.etks.online.common.domain;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * ClientCompanyRoleReq entity. @author Mohtisham.Salahria
 */
@Entity
@Table(name = "T_ETKS_CLIENT_COMPANY_ROLE_REQ", schema = "ETKS_ONLINE_DBA")
@SequenceGenerator(name = "SQ_ETKS_CC_ROLE_REQ", sequenceName = "SQ_ETKS_CC_ROLE_REQ", initialValue = 1, allocationSize = 1)
public class ClientCompanyRoleReq implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Long csrId;
	private ClientCompanyReq ClientCompanyReq;
	private String csrReqId;
	

	// Constructors

	/** default constructor */
	public ClientCompanyRoleReq() {
	}

	/** full constructor */
	public ClientCompanyRoleReq(ClientCompanyReq ClientCompanyReq,
			String csrReqId, BigDecimal applicationId) {
		this.ClientCompanyReq = ClientCompanyReq;
		this.csrReqId = csrReqId;		
	}

	// Property accessors
	@Id
	@GeneratedValue( strategy = GenerationType.SEQUENCE, generator="SQ_ETKS_CC_ROLE_REQ")
	@Column(name = "CSR_ID", unique = true, nullable = false, precision = 11, scale = 0)
	public Long getCsrId() {
		return this.csrId;
	}

	public void setCsrId(Long csrId) {
		this.csrId = csrId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CC_REQID")
	public ClientCompanyReq getCCompanyReq() {
		return this.ClientCompanyReq;
	}

	public void setCCompanyReq(ClientCompanyReq ClientCompanyReq) {
		this.ClientCompanyReq = ClientCompanyReq;
	}

	@Column(name = "CSR_REQ_ID", length = 11)
	public String getCsrReqId() {
		return this.csrReqId;
	}

	public void setCsrReqId(String csrReqId) {
		this.csrReqId = csrReqId;
	}
}